import { isArray } from '../function/type'

/**
 * //切合合并
 * @param {Array} arr
 * @param  {...any} args
 */
export function concat(arr, ...args) {
  const result = [...arr]

  args.forEach((item) => {
    isArray(item) ? result.push.apply(result, item) : result.push(item)
  })

  return result
}
